{extend name="index/index" /}
{block name="main"}
        <!-- Start of Register -->
            <div class="span8 page-content">

            <article class="type-page hentry clearfix">
                <h1 class="post-title" style="color:white;">
                个人信息
                </h1>
                <hr>
            </article>


            <form id="register-form" class="row" action="{:url('index/index/register')}" method="post" >

                <div class="span2" style="color:white;">
                <label for="name" style="color:white;">你的昵称<span>*</span> </label>
                </div>
                <div class="span6">
                <input type="text" name="name" id="name" class="required input-xlarge" value="" title="* Please provide your name">
                </div>

                <div class="span2" style="color:white;">
                <label for="email" style="color:white;">你的密码<span>*</span></label>
                </div>
                <div class="span6">
                <input type="password" name="password" id="password" class="required input-xlarge" value="" title="* Please provide a valid email address">
                </div>

                <div class="span2" style="color:white;">
                <label for="email" style="color:white;">再次输入你的密码<span>*</span></label>
                </div>
                <div class="span6">
                <input type="password" name="repassword" id="repassword" class="required input-xlarge" value="" title="* Please provide a valid email address">
                </div>

                <div class="span2" style="color:white;">
                <label for="email" >你的手机号<span>*</span></label>
                </div>
                <div class="span6">
                <input type="text" name="tel" id="tel" class="required input-xlarge" value="" title="* Please provide a valid email address"><br>
                <input type="button" name="send" value="发送手机验证码" class="btn btn-inverse">
                <img src="{$IMG_PATH}loading.gif" id="contact-loader" alt="Loading...">
                </div>

                <div class="span2" style="color:white;">
                    <label for="email" style="color:white;">你的邮箱<span>*</span></label>
                </div>
                <div class="span6">
                    <input type="text" name="email" id="email" class="email required input-xlarge" value="" title="* Please provide a valid email address">
                    <input type="button" name="send" value="发送邮箱验证码" class="btn btn-inverse">
                <img src="{$IMG_PATH}loading.gif" id="contact-loader" alt="Loading...">
                </div>

                


                <div class="span6 offset2 bm30">
                <br><br>
                <input type="submit" name="submit" value="提交" class="btn btn-inverse">
                <img src="{$IMG_PATH}loading.gif" id="contact-loader" alt="Loading...">
                </div>

                <div class="span6 offset2 error-container"></div>
                <div class="span8 offset2" id="message-sent"></div>

            </form>
            </div>
        <!-- End of Register -->


        <script>
                $('#email').click(function () {

                    $.ajax({
                        type : 'post',
                        url : {:url('index/index/sendE')},
                        // 请求成功
                        success : function (data) {
                            $('#email').value = '发送成功,请输入验证码';
                        },
                        // 请求失败
                        error : function() {
                             alert('发送失败,请点击重新发送');
                        }
                    });
                });
        </script>
{/block}
